package o;

import android.app.Activity;
import android.content.Context;
import android.text.TextUtils;
import com.huawei.appmarket.service.appdetail.bean.detail.DetailAppIntroBean;
import com.huawei.appmarket.service.appdetail.bean.detail.DetailColumnTabBean;
import com.huawei.appmarket.service.appdetail.view.fragment.AppDetailFragment;
import com.huawei.hms.support.hianalytics.HiAnalyticsConstant.KeyAndValue;
import java.util.List;
import o.dge.d;
import o.ewm.n;

public abstract class drq {
    public static void ॱ(drl o_drl, Object obj, int i) {
        if (!ˎ(i, o_drl) && !ˎ(o_drl, obj, i) && !ˋ(o_drl, obj, i)) {
            Logger.e("DetailAnalyticProcessor", "can not get click Type");
        }
    }

    private static boolean ˎ(int i, drl o_drl) {
        if (6 == i) {
            ˏ(o_drl);
            return true;
        } else if (7 != i) {
            return false;
        } else {
            ˎ(o_drl);
            return true;
        }
    }

    private static void ˏ(drl o_drl) {
        String str = null;
        if (o_drl.ˋ() instanceof AppDetailFragment) {
            AppDetailFragment appDetailFragment = (AppDetailFragment) o_drl.ˋ();
            List ʾॱ = appDetailFragment.ʾॱ();
            Context ॱˋ = appDetailFragment.ॱˋ();
            String ˋ = cju.ˋ(((DetailColumnTabBean) ʾॱ.get(appDetailFragment.ॱ())).ॱ());
            if (dgm.ˏ((Activity) ॱˋ)) {
                if ("introduce".equals(ˋ)) {
                    str = "01091006";
                    ˋ = KeyAndValue.NUMBER_01;
                } else if ("comment".equals(ˋ)) {
                    str = "01090606";
                    ˋ = "04";
                } else {
                    ˋ = null;
                }
                if (str != null) {
                    dgh.ॱ(ॱˋ, str, ˋ);
                    return;
                }
                return;
            }
            int i;
            if ("introduce".equals(ˋ)) {
                i = n.ᐝᐝ;
                ˋ = "02";
            } else if ("comment".equals(ˋ)) {
                i = n.ॱͺ;
                ˋ = "04";
            } else {
                ˋ = null;
                i = -1;
            }
            if (ˋ != null) {
                dgh.onEvent(new d(ॱˋ, i).ˏ(ˋ).ˋ());
            }
        }
    }

    private static void ˎ(drl o_drl) {
        if (o_drl.ˋ() instanceof AppDetailFragment) {
            AppDetailFragment appDetailFragment = (AppDetailFragment) o_drl.ˋ();
            Context ॱˋ = appDetailFragment.ॱˋ();
            int ॱ = appDetailFragment.ॱ();
            if (dgm.ˏ((Activity) ॱˋ)) {
                dgh.ॱ(ॱˋ, "01091006", "01|" + ॱ);
            } else {
                dgh.onEvent(new d(ॱˋ, n.ᐝᐝ).ˏ("01|" + ॱ).ˋ());
            }
        }
    }

    private static boolean ˎ(drl o_drl, Object obj, int i) {
        switch (i) {
            case 3:
                dgh.onEvent(new d(ContentManager.getInstant().getContext(), n.ॱʼ).ˏ(KeyAndValue.NUMBER_01).ˋ());
                return true;
            case 4:
                dgh.onEvent(new d(ContentManager.getInstant().getContext(), n.ॱʽ).ˏ("01|" + obj).ˋ());
                return true;
            case 5:
                Context ॱˋ = o_drl.ˋ().ॱˋ();
                if (dgm.ˏ((Activity) ॱˋ)) {
                    dgh.ॱ(ॱˋ, "01090606", "03");
                    return true;
                }
                dgh.onEvent(new d(ॱˋ, n.ॱͺ).ˏ("03").ˋ());
                return true;
            default:
                return false;
        }
    }

    private static boolean ˋ(drl o_drl, Object obj, int i) {
        switch (i) {
            case 0:
                dgh.onEvent(new d(ContentManager.getInstant().getContext(), n.ͺॱ).ˏ(KeyAndValue.NUMBER_01).ˋ());
                return true;
            case 1:
                if (obj instanceof drg) {
                    if (TextUtils.isEmpty(((drg) obj).ꜟ())) {
                        return true;
                    }
                    dgh.onEvent(new d(ContentManager.getInstant().getContext(), n.ॱʻ).ˏ(KeyAndValue.NUMBER_01).ˋ());
                    return true;
                } else if (!(obj instanceof DetailAppIntroBean)) {
                    return true;
                } else {
                    dgh.onEvent(new d(ContentManager.getInstant().getContext(), n.ˏˏ).ˏ(KeyAndValue.NUMBER_01).ˋ());
                    return true;
                }
            default:
                return false;
        }
    }
}
